#pragma once
void *iap_get_ptr(unsigned int sector, unsigned int offset);
int iap_read(unsigned int sector,unsigned int offset, void *buf,unsigned int size);
int iap_write(unsigned int sector,unsigned int offset, const void *buf,unsigned int size);
int iap_cmp(unsigned int sector, unsigned int offset, const void *buf, unsigned int size);
int iap_copy(unsigned int dest_sector, unsigned int src_sector,
        unsigned int offset, unsigned int size);
int iap_erase(unsigned int sector);
int iap_blank_check(unsigned int sector);
int iap_read_serial(void);
int iap_read_version(void);
int iap_read_id(void);
void iap_init(void);
int iap_prepare(unsigned int);
